<?php
namespace app\ice\model;
use think\Db;
use think\Model;

class Coupon extends Model
{
    protected $table = 'ig_coupon';

    //获取首页订单
    public function getCouponList($param,$status){
        $list = $this->where('uid',$param['uid'])->where('status',$status)->order('expireTime desc,money desc')->select();
        if($list){
            foreach ($list as $key => &$value) {
                $value['expireTime'] = date('Y-m-d H:i:s',$value['expireTime']);
            }
        }
        return $list;
    }
}